<%@ page import="java.util.ArrayList" %>
<%@ page import="cn.kgc.javaweb.entity.Student" %>
<%@ page import="java.util.TreeMap" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>主页</title>
</head>
<body>

<%--显示所有学生信息 表格
  session  获取学生信息   内置对象  域对象
--%>

<%
    ArrayList<Student> students = (ArrayList<Student>)session.getAttribute("students");
%>
<table border="1px" width="100%" height="300px">
    <tr>
        <th>学号</th>
        <th>姓名</th>
        <th>年龄</th>
        <th>生日</th>
    </tr>
 <%
        //遍历集合 获取对象信息 
    for(Student student:students){

 %>
    <tr>
        <td><%=student.getStuNo()%></td>
        <td><%=student.getStuName()%></td>
        <td><%=student.getAge()%></td>
        <td><%=student.getBirth()%></td>
    </tr>
    <%

    }

 %>


</table>


</body>
</html>
